package com.ninthgroup.service;

import com.ninthgroup.entity.Role;
import com.ninthgroup.vo.Result;
import com.ninthgroup.vo.RoleVo;

/**
 * @author ：1452863884@qq.com rcg
 * @date ：Created in 2022/10/15 13:29
 * @description：角色的服务层接口
 * @modified By：
 * @version:1.0
 */
public interface RoleService {

    /**
     * @param currentPage
     * @param pageSize
     * @param roleVo
     * @return
     * @create by: 1452863884@qq.com rcg
     * @description:根据条件查询角色
     * @create time: 2022/10/15 13:30
     */
    Result findByCondition(Integer currentPage, Integer pageSize, RoleVo roleVo);


    /**
     * @create by: 1452863884@qq.com rcg
     * @description:通过员工id查询其具有所有权限
     * @create time: 2022/10/18 19:07
     * @param doctorId
     * @return com.ninthgroup.vo.Result
     */
    Result findByDoctorId(Integer doctorId);

    /**
     * @create by: 1452863884@qq.com rcg
     * @description:通过关联表给用户添加角色
     * @create time: 2022/10/18 19:07
     * @param dId
     * @param roleIds
     * @return com.ninthgroup.vo.Result
     */
    Result qr(Integer dId, Integer[] roleIds);



    /**
     * @create by: 1452863884@qq.com rcg
     * @description:删除角色
     * @create time: 2022/10/18 19:07
     * @param roleId
     * @return com.ninthgroup.vo.Result
     */
    Result deleteRole(Integer roleId);


    /**
     * @param role
     * @return com.ninthgroup.vo.Result
     * @create by: 1452863884@qq.com rcg
     * @description:更新角色信息
     * @create time: 2022/10/18 19:07
     */
    Result updateRole(Role role);


}
